package com.sss.service.impl;

import com.sss.mapper.StuMapper;
import com.sss.model.Classroom;
import com.sss.model.Stu;
import com.sss.model.StuVO;
import com.sss.service.StuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * 全世界我最爱朴彩英！
 *
 * @Author sss
 * @Create 2023/12/7 19:10
 * @desc
 */
@Service
public class StuServiceImpl implements StuService {

   @Autowired
   private StuMapper mapper;
    public Stu findStuById(int id) {
        return mapper.findStuById(id);
    }

    public Stu findStuBySname(String sname) {
        return mapper.findStuBySname(sname);
    }

    public List<Stu> findStuAll() {
        return mapper.findStuAll();
    }

    public int updateStu(Stu stu) {
        return mapper.updateStu(stu);
    }

    public int addStu(Stu stu) {
        return mapper.addStu(stu);
    }

    public int deleteStu(int id) {
        return mapper.deleteStu(id);
    }

    public List<Stu> findByMap(HashMap<String, Object> map) {
        return mapper.findByMap(map);
    }

    public List<StuVO> findAllStuAndClassroom() {
        return mapper.findAllStuAndClassroom();
    }

    public StuVO findStudentAndAllSubjectByStuid(int sid) {
        return mapper.findStudentAndAllSubjectByStuid(sid);
    }

    public List<Classroom> findClass() {
        return mapper.findClass();
    }
}
